﻿#ifndef __GAF_STRUCT_H__
#define __GAF_STRUCT_H__

#include "GAF_Define.h"

namespace GAF
{
	template<class T> class Struct; //-* ForEach
}
#define GAF_CStruct		GAF::Struct

#include "GAF_ForEach.h"

namespace GAF
{
	/// 数据结构模板基类
	template<class T>
	class _ABSTRACT Struct : public ForEach
	{
	public:
		Struct() {}
		virtual ~Struct() {}
	public:
		/// 清除所有对象
		virtual bool		Clean(T* _OUT ptReturn = NULL) = 0;
	public:
		virtual void*		Foreach(bool bFirst) = 0;
		virtual UINT		GetCount() = 0;

		/// 获得所包含对象数量（有符号版本）
		int			GetCount_S()			// 有符号版本，所得结果有可能存在问题
					{return (int)GetCount();}
	};
}

#endif

